package  
{
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Image;
	import net.flashpunk.utils.Input;
	import net.flashpunk.FP;
	/**
	 * ...
	 * @author OSEAN4
	 */
	public class Monster extends Entity
	{
		[Embed(source = 'resource/monster.jpg')]
        private const PLAYER:Class;
		
		public function Monster() 
		{
			graphic = new Image(PLAYER);
			setHitbox(50, 50);
			type = "monster";
			this.x = 400;
			this.y = 300;
		}
		
		override public function update():void
		{
			if (Input.mouseDown)
            {
                this.x = Input.mouseX;
				this.y = Input.mouseY;
            }
			if (collide("myentity", x, y)) 
			{
				FP.world.remove(this);
			}
			
		}
		
	}

}